package com.kingwang.training.designpattern.memento.bo.text;

import lombok.Data;

/**
 * @author King
 */
@Data
public class TextEditor {
    private String content;

    public TextMemento saveToMemento() {
        return new TextMemento(this.content);
    }

    public void restoreFromMemento(TextMemento memento) {
        this.content = memento.getContent();
    }
}
